﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caifu.Datas;

namespace Caifu.Clients
{
	/// <summary>
	/// 基金托管人操作类。
	/// </summary>
	public static class TrusteeClient
	{
		/// <summary>
		/// 新增基金托管人
		/// </summary>
		/// <param name="Trustee"></param>
		public static void AddTrustee(Trustee Trustee)
		{
			TrusteeData.Instance.AddTrustee(Trustee);
		}

		/// <summary>
		/// 修改基金托管人
		/// </summary>
		/// <param name="Trustee"></param>
		public static void UpdateTrustee(Trustee Trustee)
		{
			TrusteeData.Instance.UpdateTrustee(Trustee);
		}

		/// <summary>
		/// 删除基金托管人
		/// </summary>
		/// <param name="id"></param>
		public static void DeleteTrustee(Guid id)
		{
			TrusteeData.Instance.DeleteTrustee(id);
		}

		/// <summary>
		/// 获取基金托管人
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		public static Trustee GetTrustee(Guid id)
		{
			return TrusteeData.Instance.GetTrustee(id);
		}

		/// <summary>
		/// 获取基金托管人。
		/// </summary>
		/// <param name="pageIndex"></param>
		/// <param name="pageSize"></param>
		/// <returns></returns>
		public static IList<Trustee> GetTrustees(Int32 pageIndex, Int32 pageSize)
		{
			return TrusteeData.Instance.GetTrustees(pageIndex, pageSize);
		}

		/// <summary>
		/// 获取所有基金托管人。
		/// </summary>
		/// <returns></returns>
		public static IList<Trustee> GetTrustees()
		{
			return TrusteeData.Instance.GetTrustees(1, Int32.MaxValue);
		}
	}
}
